import request from '@/utils/request'

// 查询培训计划列表
export function listTrainPlan(query) {
  return request({
    url: '/cld/trainPlan/list',
    method: 'get',
    params: query
  })
}

// 查询培训计划详细
export function getTrainPlan(trainPlanId) {
  return request({
    url: '/cld/trainPlan/' + trainPlanId,
    method: 'get'
  })
}

// 新增培训计划
export function addTrainPlan(data) {
  return request({
    url: '/cld/trainPlan',
    method: 'post',
    data: data
  })
}

// 修改培训计划
export function updateTrainPlan(data) {
  return request({
    url: '/cld/trainPlan',
    method: 'put',
    data: data
  })
}

// 删除培训计划
export function delTrainPlan(trainPlanId) {
  return request({
    url: '/cld/trainPlan/' + trainPlanId,
    method: 'delete'
  })
}
